home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Rozne / HTTrack 3.40-2 / httrack-3.40-2.exe / {app} / src_win / WinHTTrack / LaunchHelp.cpp < prev    next >
C/C++ Source or Header  |  2000-06-05  |  1KB  |  63 lines

  1. // LaunchHelp.cpp : implementation file
  2. //
  3.  
  4. #define VIEW_HELP 0
  5.  
  6. #include "stdafx.h"
  7. #include "LaunchHelp.h"
  8. #include "DialogHtmlHelp.h"
  9. #include "process.h"
  10.  
  11. #if VIEW_HELP
  12. #include "htmlfrm.h"
  13. #endif
  14.  
  15. LaunchHelp::LaunchHelp() {
  16.   page="";
  17. }
  18. LaunchHelp::~LaunchHelp() {
  19.   if (b.m_hWnd) {
  20.     b.EndDialog(IDCANCEL);
  21.   }
  22. }
  23.  
  24. void LaunchHelp::Help(CString page) {
  25. #if VIEW_HELP
  26. #else
  27.   if (!b)
  28.     this->page=page;
  29.   else {
  30.     if (b.m_hWnd)
  31.       this->b.Go(page);
  32.     else
  33.       this->page=page;
  34.   }
  35. #endif
  36.   GoHelp();
  37. }
  38.  
  39. void LaunchHelp::Help() {
  40.   Help("index.html");
  41. }
  42.   
  43. void LaunchHelp::GoHelp() {
  44. #if VIEW_HELP
  45.   CHtmlFrame* frm=new CHtmlFrame;
  46.     if (!frm->LoadFrame(IDR_HELPFRM))
  47.         return;
  48.   frm->ShowWindow(SW_SHOWNORMAL);
  49.     frm->UpdateWindow();
  50. #else
  51.   if (!b.m_hWnd) {
  52.     b.page=page;
  53.     RECT rect;
  54.     rect.bottom=rect.left=rect.right=rect.top=0;
  55.     b.Create(NULL,NULL,WS_OVERLAPPEDWINDOW,rect,NULL,0);
  56.     b.ShowWindow(SW_SHOWNORMAL);
  57.   } else {
  58.     b.SetForegroundWindow();
  59.   }
  60. #endif
  61. }
  62.  
  63.